import request from '@/utils/request'

export default {

  addGroup(groupAddRequest) {
    return request({
      url: '/admin/group',
      method: 'post',
      data: groupAddRequest
    })
  },
  addGroupNumber(groupAddRequest) {
    return request({
      url: '/admin/group',
      method: 'put',
      data: groupAddRequest
    })
  },
  removeGroupNumber(groupAddRequest) {
    return request({
      url: '/admin/group',
      method: 'delete',
      data: groupAddRequest
    })
  },
  getGroupById(groupid) {
    return request({
      url: '/admin/group/' + groupid,
      method: 'get'
    })
  },
  getGroups(groupPageRequest) {
    return request({
      url: '/admin/group/list',
      method: 'post',
      data: groupPageRequest
    })
  },
  queryAllGroups() {
    return request({
      url: '/admin/group/all',
      method: 'get'
    })
  },
  removeGroup(groupid) {
    return request({
      url: '/admin/group/' + groupid,
      method: 'delete'
    })
  },
  removeGroups(allGroupIds) {
    return request({
      url: '/admin/group/list',
      method: 'delete',
      data: allGroupIds
    })
  },
  queryAllLeaders() {
    return request({
      url: '/admin/group/leader/all',
      method: 'get'
    })
  },
  queryAllRemainTeachers(groupid) {
    return request({
      url: '/admin/group/remain/' + groupid,
      method: 'get'
    })
  }
}
